<template>
  <view>
  </view>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
export default {
  computed: {
    ...mapGetters(['isLogin']),
  },
  onLaunch: function() {
    if (this.isLogin) {
      this.getUserInfo();
    }
  },
  onShow: function () {
    const systemInfo = uni.getSystemInfoSync();
    const { top, height } = uni.getMenuButtonBoundingClientRect();
    const titleBarHeight = (top - systemInfo.statusBarHeight) * 2 + height;
    this.$store.commit(
      'setStatusBarHeight',
      titleBarHeight + systemInfo.statusBarHeight
    );
    console.log('App Show');
  },
  onHide: function () {
    console.log('App Hide');
  },
  methods: {
    ...mapActions(['getUserInfo']),
  },
};
</script>

<style lang="scss">
/*每个页面公共css */
@import 'uview-ui/index.scss';
@import './scss/common.scss';
@import './scss/iconfont.css';
</style>
